import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router";

const routes: Array<RouteRecordRaw> = [
 
  {
    path: "/",
    redirect: "/home",
  },
  {
    path: "/home",
    component: () => import("../views/home/Index.vue"),
    children: [
      {
        path: "/home",
        redirect: "/home/myhome",
      },
      {
        path: "/home/myhome",
        component: () => import("../views/home/myhome/Index.vue"),
      },
      {
        path: "/home/myzhongx",
        component: () => import("../views/home/myzhongx/Index.vue"),
      },
      {
        path: "/home/mycaiwu",
        component: () => import("../views/home/mycaiwu/Index3.vue"),
        children: [
          {
            path: "/home/mycaiwu",
            redirect: "/home/mycaiwu/yuedu",
          },
          {
            path: "/home/mycaiwu/yuedu",
            component: () => import("../views/home/mycaiwu/Index.vue"),
          },
          {
            path: "/home/mycaiwu/yuangong",
            component: () => import("../views/home/mycaiwu/Index2.vue"),
          },
        ],
      },
      {
        path: "/home/mystudents",
        component: () => import("../views/home/mystudents/Index3.vue"),
        children: [
          {
            path: "/home/mystudents",
            redirect: "/home/mystudents/xueyuan",
          },
          {
            path: "/home/mystudents/xueyuan",
            component: () => import("../views/home/mystudents/Index.vue"),
          },
          {
            path: "/home/mystudents/banji",
            component: () => import("../views/home/mystudents/Index2.vue"),
          },
        ],
      },
      {
        path: "/home/mytecher",
        component: () => import("../views/home/mytecher/Index.vue"),
      },
      {
        path: "/home/zixun",
        component: () => import("../views/home/zixun/Index3.vue"),
        children: [
          {
            path: "/home/zixun",
            redirect: "/home/zixun/lunbo",
          },
          {
            path: "/home/zixun/lunbo",
            component: () => import("../views/home/zixun/Index.vue"),
          },
          {
            path: "/home/zixun/wenz",
            component: () => import("../views/home/zixun/Index2.vue"),
          },
        ],
      },
      {
        path: "/home/shouhou",
        component: () => import("../views/home/shouhou/Index.vue"),
      },
    ],
  },
  {
    path: "/login",
    component: () => import("../views/login/Index.vue"),
  },
];

const router = createRouter({
  history: createWebHistory(),
  routes,
});

export default router;
